<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
 Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="MarkLogicPowerPointAddin.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>MarkLogicPowerPointAddin.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		API documentation for MarkLogicPowerPointAddin.js



 http://www.marklogic.com 

 <BR/><BR/><B>Version: </B>0.1<BR/><BR/><B>Author:</B> Pete Aven pete.aven@marklogic.com
 <BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="MLA.html">MLA</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/* 
Copyright 2009 Mark Logic Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/</span>

<span class="comment">/** 
 * <span class="attrib">@fileoverview</span>  API documentation for MarkLogicPowerPointAddin.js
 *
 *
 *
 * {<span class="attrib">@link</span> http://www.marklogic.com} 
 *
 * <span class="attrib">@author</span> Pete Aven pete.aven<span class="attrib">@marklogic</span>.com
 * <span class="attrib">@version</span> 0.1 
 */</span>


<span class="comment">/**
 * The MLA namespace is used for global attribution. The methods within this namespace provide ways of interacting with an active Open XML document through a WebBrowser control. The control must be deployed within an Addin in Office 2007.
 *
 * The functions here provide ways for interacting with the active presentation in PowerPoint ; however, the functions getCustomXMLPart(), getCustomXMLPartIds(), addCustomXMLPart(), and deleteCustomXMLPart() will work for any Open XML package, provided they are used within the context of an Addin for the appropriate Office application.
 */</span>
<span class="comment">//var MLA = {};</span>

<span class="reserved">function</span> MLA(){
      <span class="reserved">this</span>.getClassName = <span class="reserved">function</span>(){
      <span class="reserved">return</span> <span class="literal">"MLA"</span>;
   
      }
}

<span class="comment">/** <span class="attrib">@ignore</span> */</span>
MLA.version = { <span class="literal">"release"</span> : <span class="literal">"@MAJOR_VERSION.@MINOR_VERSION@PATCH_VERSION"</span> }; 

<span class="comment">/** <span class="attrib">@ignore</span> */</span>
MLA.SimpleRange = <span class="reserved">function</span>(begin,finish){
	<span class="reserved">this</span>.start = begin;
	<span class="reserved">this</span>.end = finish;

};

<span class="comment">/** <span class="attrib">@ignore</span> */</span>
String.<span class="reserved">prototype</span>.trim = <span class="reserved">function</span>() {
	<span class="reserved">return</span> <span class="reserved">this</span>.replace(/^\s+|\s+$/g,<span class="literal">""</span>);
}


<span class="comment">/**
 * Returns version of MarkLogicPowerPointAddin.js library.
 * <span class="attrib">@return</span> the version of MarkLogicWordAddin.js
 * <span class="attrib">@type</span> string
 */</span>
MLA.getVersion = <span class="reserved">function</span>()
{
	<span class="reserved">return</span> MLA.version.release;
}

<span class="comment">/** <span class="attrib">@ignore</span> */</span>
MLA.errorCheck = <span class="reserved">function</span>(message)
{
	var returnVal = null;
        var errStr = message.substring(0,6);
	var len = message.length;
        var errMsg = message.substring(7,len);

        <span class="reserved">if</span>(errStr==<span class="literal">"error:"</span>)
		returnVal=errMsg;

	<span class="reserved">return</span> returnVal;

}
<span class="comment">/** Utility function for creating Microsoft.XMLDOM object from string.
 *
 *<span class="attrib">@param</span> xmlString the string to be loaded into a XMLDOM object.  The string must be serialized, well-formed XML.
 *<span class="attrib">@return</span> Microsoft.XMLDOM object
 *<span class="attrib">@throws</span> Exception if unable to create the XMLDOM object
 */</span>
MLA.createXMLDOM = <span class="reserved">function</span>(xmlstring)
{
	try{
		var xmlDom = new ActiveXObject(<span class="literal">"Microsoft.XMLDOM"</span>);
       		xmlDom.async=false;
       		xmlDom.loadXML(xmlstring);
	}
	catch(err)
 	{
                throw(<span class="literal">"Error: Not able to create XMLDOM from string.  Make sure XML is well formed. "</span>);
	}

        <span class="reserved">if</span>(xmlDom.text==<span class="literal">""</span> &amp;&amp; xmlDom.xml == <span class="literal">""</span>)
                throw(<span class="literal">"Error: Not able to create XMLDOM from string.  Make sure XML is well formed. "</span>);

   <span class="reserved">return</span> xmlDom;
}

<span class="comment">/** <span class="attrib">@ignore</span> */</span>
MLA.unescapeXMLCharEntities = <span class="reserved">function</span>(stringtoconvert)
{
	var unescaped = <span class="literal">""</span>;
	unescaped = stringtoconvert.replace(/&amp;amp;/g,<span class="literal">"&amp;"</span>);
	unescaped = unescaped.replace(/&amp;lt;/g,  <span class="literal">"&lt;"</span>);
	unescaped = unescaped.replace(/&amp;gt;/g,  <span class="literal">"&gt;"</span>);
	unescaped = unescaped.replace(/&amp;quot;/g,<span class="literal">"\"</span><span class="literal">");
	unescaped = unescaped.replace(/&amp;apos;/g,"</span>\<span class="literal">'");
	return unescaped;
}
/** @ignore */
MLA.escapeXMLCharEntities = function(stringtoconvert)
{
	var escaped = "";
	escaped = stringtoconvert.replace(/&amp;/g,"&amp;amp;");
	escaped = escaped.replace(/&lt;/g, "&amp;lt;");
	escaped = escaped.replace(/&gt;/g, "&amp;gt;");
	escaped = escaped.replace(/\"/g,"&amp;quot;");
	escaped = escaped.replace(/\'</span>/g, <span class="literal">"&amp;apos;"</span>);
	<span class="reserved">return</span> escaped;
}
<span class="comment">/**
 * Returns ids for custom parts (not built-in) that are part of the active Open XML package. (.docx, .xlsx, .pptx, etc.)
 * <span class="attrib">@returns</span> the ids for custom XML parts in active Open XML package as array of string
 * <span class="attrib">@type</span> Array 
 */</span>
MLA.getCustomXMLPartIds = <span class="reserved">function</span>()
{ 
	var partIds = window.external.getCustomXMLPartIds();

	var errMsg = MLA.errorCheck(partIds);

	<span class="reserved">if</span>(errMsg!=null)
	  throw(<span class="literal">"Error: Not able to get CustomXMLPartIds; "</span>+errMsg);

	var customPartIds = partIds.split(<span class="literal">" "</span>);

	<span class="reserved">if</span>(customPartIds.length ==1)
	{
		<span class="reserved">if</span> (customPartIds[0] == null || customPartIds[0] == <span class="literal">""</span>)
		{
			customPartIds.length = 0;
		}
	}

	<span class="reserved">return</span> customPartIds;
}

<span class="comment">/**
 * Returns the custom XML part, identified by customXMLPartId, that is part of the active Open XML package. (.docx, .xlsx, .pptx, etc.)
 * <span class="attrib">@param</span> customXMLPartId the id of the custom part to be fetched from the active package
 * <span class="attrib">@return</span> the XML for the custom part as a DOM object. 
 * <span class="attrib">@type</span> Microsoft.XMLDOM object 
 * <span class="attrib">@throws</span> Exception if there is error retrieving the custom part 
 */</span>
MLA.getCustomXMLPart = <span class="reserved">function</span>(customXMLPartId)
{
	var customXMLPart = window.external.getCustomXMLPart(customXMLPartId);

	var errMsg = MLA.errorCheck(customXMLPart);

	<span class="reserved">if</span>(errMsg!=null){
	   throw(<span class="literal">"Error: Not able to getCustomXMLPart; "</span>+errMsg);
	}
        
	var v_cp;

	<span class="reserved">if</span>(customXMLPart==<span class="literal">""</span>)
	{
		v_cp=null;
	}
        <span class="reserved">else</span>
	{
        	v_cp = MLA.createXMLDOM(customXMLPart); 
	}

	<span class="reserved">return</span> v_cp;
}

<span class="comment">/** Adds custom part to active Open XML package.  Returns the id of the part added.
 *<span class="attrib">@param</span> customPartXML Either A) an XMLDOM object that is the custom part to be added to the active Open XML package, or B)The string serialization of the XML to be added as a custom part to the active Open XML package. ( The XML must be well-formed. )
 *<span class="attrib">@return</span> id for custom part added 
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to add custom part
 */</span>
MLA.addCustomXMLPart = <span class="reserved">function</span>(customPartXml)
{
	var v_customPart =<span class="literal">""</span>;
	<span class="reserved">if</span>(customPartXml.xml)
	{
               v_customPart=customPartXml.xml;
	}
	<span class="reserved">else</span>
	{
	       v_customPart=customPartXml
	}
	
	var newId = window.external.addCustomXMLPart(v_customPart);

	var errMsg = MLA.errorCheck(newId);
	<span class="reserved">if</span>(errMsg!=null)
	   throw(<span class="literal">"Error: Not able to addCustomXMLPart; "</span>+errMsg);

	<span class="reserved">if</span>(newId ==<span class="literal">""</span>)
	  newId=null;

	<span class="reserved">return</span> newId;
}

<span class="comment">/** Deletes custom part from Active Open XML package identified by id.
 *<span class="attrib">@param</span> customXMLPartId the id of the custom part to be deleted from the active Open XML package.
 *<span class="attrib">@throws</span> Exception if unable to delete custom part
 */</span>
MLA.deleteCustomXMLPart = <span class="reserved">function</span>(customXMLPartId)
{
	var deletedPart = window.external.deleteCustomXMLPart(customXMLPartId);

        var errMsg = MLA.errorCheck(deletedPart);
	<span class="reserved">if</span>(errMsg!=null)
	   throw(<span class="literal">"Error: Not able to deleteCustomXMLPart; "</span>+errMsg);
     
	<span class="reserved">if</span>(deletedPart==<span class="literal">""</span>)
	  deletedPart = null;

}

<span class="comment">/** <span class="attrib">@ignore</span> */</span>
MLA.isArray = <span class="reserved">function</span>(obj)
{
 <span class="reserved">return</span> obj.constructor == Array;
}

<span class="comment">/**
 *
 *Returns MLA.config. The fields for this object are version, url, and theme.  
version - the version of the Addin library, url - the url used by the Addin WebBrowser control, theme - the current color scheme used by Office. 
 *<span class="attrib">@throws</span> Exception if unable to create MLA.config object
 */</span>
MLA.getConfiguration = <span class="reserved">function</span>()
{
        var version = window.external.getAddinVersion();
	var color = window.external.getOfficeColor();
	var webUrl = window.external.getBrowserURL();

	<span class="reserved">if</span>(version == <span class="literal">""</span> || color == <span class="literal">""</span> || webUrl == <span class="literal">""</span>)
		throw(<span class="literal">"Error: Not able to access configuration info."</span>);

	MLA.config = {
		        <span class="literal">"version"</span>:version,
			<span class="literal">"url"</span>:webUrl,
			<span class="literal">"theme"</span>:color
	};

        <span class="reserved">return</span> MLA.config;	
}
<span class="comment">/** Inserts image into the Presentation.  
 *<span class="attrib">@param</span> url a url to XQuery module that will return the image when evaluated  
 *<span class="attrib">@param</span> user username for the MarkLogic Server the picuri connects with
 *<span class="attrib">@param</span> pwd password for the MarkLogic Server the picuri connects with
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to insert image
 */</span>
MLA.insertImage = <span class="reserved">function</span>(url,user,pwd)
{
	
	var inserted = window.external.InsertImage(url,user,pwd);
	var errMsg = MLA.errorCheck(inserted);

	<span class="reserved">if</span>(errMsg!=null)
	   throw(<span class="literal">"Error: Not able to insertImage; "</span>+errMsg);

	<span class="reserved">return</span> inserted;
}

<span class="comment">/** Inserts slide, identified by slideIdx,  into the active presentation at current slide position.  
 *<span class="attrib">@param</span> tmpPath the directory (including path) where the local copy of presentation will be saved.  
 *<span class="attrib">@param</span> filename the name of the .pptx file
 *<span class="attrib">@param</span> slideIdx the index of the slide within the source powerpoint file to be copied
 *<span class="attrib">@param</span> url the url of the .pptx to be downloaded
 *<span class="attrib">@param</span> user the username of the MarkLogic Server the url connects with
 *<span class="attrib">@param</span> pwd the password of the MarkLogic Server the url connects with
 *<span class="attrib">@param</span> retain true or false setting determines whether background style of copied slide will be retained when copied to active presentation
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to copy slide to active presentation 
 */</span>
MLA.insertSlide = <span class="reserved">function</span>(tmpPath, filename, slideidx, url, user, pwd,retain)
{
	var msg = window.external.insertSlide(tmpPath,filename,slideidx,url,user,pwd,retain);
	var errMsg = MLA.errorCheck(msg);
	<span class="reserved">if</span>(errMsg!=null)
	   throw(<span class="literal">"Error: Not able to insertSlide; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/**
 * Returns the path being used for the /temp dir on the client system.
 * <span class="attrib">@return</span> /temp path on client system
 * <span class="attrib">@type</span> string
 * <span class="attrib">@throws</span> Exception if unable to retrieve the /temp path
 */</span>
MLA.getTempPath = <span class="reserved">function</span>()
{
	<span class="comment">//alert("IN HERE");</span>
	var msg=window.external.getTempPath();
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to getTempPath; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/** Opens .pptx  into PowerPoint from local copy saved to client from MarkLogic.
 *<span class="attrib">@param</span> tmpPath the directory (including path) where the local copy of presentation will be saved.  
 *<span class="attrib">@param</span> docuri the uri of the .pptx within MarkLogic
 *<span class="attrib">@param</span> url the url for fetching the .pptx to be downloaded
 *<span class="attrib">@param</span> user the username for the MarkLogic Server the url connects with
 *<span class="attrib">@param</span> pwd the password for the MarkLogic Server the url connects with
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to download and open local copy 
 */</span>
MLA.openPPTX = <span class="reserved">function</span>(tmpPath, docuri, url, user, pwd)
{
	<span class="comment">//alert("tmpPath: "+tmpPath+" docuri: "+docuri+" url:"+url+" user/pwd:"+ user+pwd);</span>
	var msg = window.external.openPPTX(tmpPath, docuri, url, user, pwd);
        var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to openPPTX; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}
<span class="comment">/** Inserts text into the Presentation at cursor position.  
 *<span class="attrib">@param</span> text text to inser
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to insert text
 */</span>
MLA.insertText = <span class="reserved">function</span>(text)
{
	var msg = window.external.insertText(text);
        var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to insertText; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/** Embeds OLE into the Presentation. the OLE is downloaded to client and saved into Presentation from local file.
 *<span class="attrib">@param</span> tmpPath the directory (including path) where the local copy of object to be embedded will be saved.  
 *<span class="attrib">@param</span> filename the name of the file to be embedded. tmpPath + filename should be the name and path of file on client.  
 *<span class="attrib">@param</span> url the url for the file to be downloaded and embedded
 *<span class="attrib">@param</span> user username for MarkLogic Server url connects with
 *<span class="attrib">@param</span> pwd password for MarkLogic Server url connects with
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to embedOLE 
 */</span>
MLA.embedOLE = <span class="reserved">function</span>(tmpPath, title, url, usr, pwd)
{
	var msg = window.external.embedOLE(tmpPath, title, url, usr, pwd);
	var errMsg = MLA.errorCheck(msg);
        <span class="comment">//alert("errMsg"+errMsg);</span>
        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to embedOLE; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/** Launches Windows form on client as simple SaveAs text box. 
 * <span class="attrib">@return</span> text entered by user as filename into form
 * <span class="attrib">@type</span> string 
 *<span class="attrib">@throws</span> Exception if unable to return text 
 */</span>
MLA.useSaveFileDialog =<span class="reserved">function</span>()
{
	var msg=window.external.useSaveFileDialog();
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to embedOLE; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/** Converts .pptx filename to image directory name.
 * <span class="attrib">@param</span> filename the name to be converted
 * <span class="attrib">@return</span> converted_name replaces .pptx of filename with _PNG 
 * <span class="attrib">@type</span> string
 * <span class="attrib">@throws</span> Exception if unable to retrieve the /temp path
 */</span>
MLA.convertFilenameToImageDir = <span class="reserved">function</span>(filename)
{
	<span class="comment">//alert("IN HERE");</span>
	var msg=window.external.convertFilenameToImageDir(filename);
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to convert filename to image directory name; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/**
 * Returns the path being used for the active Presentation on the client system.
 * <span class="attrib">@return</span> path path is path for where current Presentation is saved on client
 * <span class="attrib">@type</span> string
 * <span class="attrib">@throws</span> Exception if unable to retrieve the presentation path
 */</span>
MLA.getPresentationPath = <span class="reserved">function</span>()
{
	var msg=window.external.getPresentationPath();
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to getPresentationPath; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/**
 * Returns the name being used for the active Presentation on the client system.
 * <span class="attrib">@return</span> presentation_name the name of the active Presentation
 * <span class="attrib">@type</span> string
 * <span class="attrib">@throws</span> Exception if unable to retrieve the presentation name
 */</span>
MLA.getPresentationName = <span class="reserved">function</span>()
{
	var msg=window.external.getPresentationName();
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to getPresentationName; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/**
 * Saves .pptx for active Presentation on the client system.
 * <span class="attrib">@param</span> filename the filename (including path) to save Presentation as on client system
 * <span class="attrib">@type</span> string
 * <span class="attrib">@throws</span> Exception if unable to save local copy
 */</span>
MLA.saveLocalCopy = <span class="reserved">function</span>(filename)
{
	var msg = window.external.saveLocalCopy(filename);
        var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to saveLocalCopy; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}


<span class="comment">/** Saves active Presentation to MarkLogic from client system.  .pptx being saved to ML must already exist (be saved) on client and have both path and name.
 *<span class="attrib">@param</span> filename the name of the file (including path) to be saved to MarkLogic  
 *<span class="attrib">@param</span> url the url on MarkLogic that the client calls to upload the presentation
 *<span class="attrib">@param</span> user username for MarkLogic Server url connects with
 *<span class="attrib">@param</span> pwd password for MarkLogic Server url connects with
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to save the active Presentation
 */</span>
MLA.saveActivePresentation = <span class="reserved">function</span>(filename, url, user, pwd)
{

	var msg=window.external.saveActivePresentation(filename, url, user, pwd);
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to saveActivePresentation; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}


<span class="comment">/** Saves directory of images on client. saves this directory and its contents to MarkLogic.
 *<span class="attrib">@param</span> imgdir the name of the directory (including path) where to save the images on the client system  
 *<span class="attrib">@param</span> url the url on MarkLogic that the client calls to upload the image directory and contents to MarkLogic
 *<span class="attrib">@param</span> user username for MarkLogic Server url connects with
 *<span class="attrib">@param</span> pwd password for MarkLogic Server url connects with
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to save images
 */</span>
MLA.saveImages = <span class="reserved">function</span>(imgdir, url, user, pwd)
{
	var msg = window.external.saveImages(imgdir,url,user,pwd);
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to saveImages; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/** Saves Presentation on client as .pptx. Saves same .pptx to MarkLogic. Saves images for Presentation to client.  Saves same images to MarkLogic.
 *<span class="attrib">@param</span> saveasdir the name of the directory (including path) where to save the local copies
 *<span class="attrib">@param</span> saveasname the name to save the .pptx as (no path)
 *<span class="attrib">@param</span> url the url on MarkLogic that the client calls to upload the Presentation and images to MarkLogic
 *<span class="attrib">@param</span> user username for MarkLogic Server url connects with
 *<span class="attrib">@param</span> pwd password for MarkLogic Server url connects with
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to save active Presentation and images
 */</span>
MLA.saveActivePresentationAndImages = <span class="reserved">function</span>(saveasdir, saveasname, url, user, pwd)
{
	var msg=window.external.saveActivePresentationAndImages(saveasdir, saveasname, url, user, pwd);
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to saveActivePresentationAndImages; "</span>+errMsg);

	<span class="reserved">return</span> msg;
}

<span class="comment">/** Inserts JSON string as table in Active Presentation.  
 * see template example in insertJSONTable() found in Samples/officesearch/officesearch.js for required JSON format.
 *<span class="attrib">@param</span> table the JSON representation of the table to be inserted
 *<span class="attrib">@type</span> string
 *<span class="attrib">@throws</span> Exception if unable to save insert table into Presentation
 */</span>
MLA.insertJSONTable = <span class="reserved">function</span>(table)
{
	var msg=window.external.insertJSONTable(table);
	var errMsg = MLA.errorCheck(msg);

        <span class="reserved">if</span>(errMsg!=null) 
        	throw(<span class="literal">"Error: Not able to insertJSONTable(); "</span>+errMsg);

	<span class="reserved">return</span> msg;
}


</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Sep 16 10:20:21 2009</div>
</body>
</html>
